<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<jsp:include page="/order/include/base_order_pre_part.jsp"></jsp:include>
<div class="layout_1_3">

	<div class="left box_blue" id="left_categories">
		<div class="box_title">
			分类
			<s:if test="category!=null">
				<s:set name="parentCateId" value="category.parent==null?'':category.parent.id"></s:set>
				<INPUT type="button" value="<" onclick=" javascript:searchParentCate('<s:property value="#parentCateId" />');" />
			</s:if>
			<s:if test="cateLevel>1">
				<INPUT type="button" value="^" onclick=" javascript:searchUpLevel();" />
			</s:if>
		</div>
		<div class="box_body">
		<s:if test="category!=null">
			<div class="dotbuttom">
				<s:property value="category.name" />
			</div>
		</s:if>

		<script type="text/javascript">
		cateLevel=<s:property value="cateLevel"/>;
		</script>

		<ul>
			<s:if test="categories!=null && categories.size()>0">
				<s:iterator value="categories">
					<li>
						<a href="#" onclick="javascript:searchinto('<s:property value="id" />');"> <s:property value="name" /> </a>
						<font class="more">( <s:property value="count" /> )</font>
					</li>
				</s:iterator>
			</s:if>
			<s:else>
				<s:set name="cateList" value="getCateChildren(cateId)" />
				<s:iterator value="#cateList">
					<li>
						<a href="#" onclick="javascript:searchinto('<s:property value="id" />');"> <s:property value="name" /> </a>
					</li>
				</s:iterator>
			</s:else>
		</ul>
		</div>
	</div>

	<div class="right box_blue">
		<div class="box_title">
			查询结果
			<s:if test="cateLevel>1">
				<INPUT type="button" value="返回" onclick="javascript:history.go(-1);" />
			</s:if>
		</div>
		<s:if test="orders == null || orders.size() == 0">
			<div class="alertmessage">
				没有符合要求的数据!
			</div>
		</s:if>
		<s:else>
			<ul class="list_box">
				<s:iterator value="orders" id="item">
					<li class="item">
						<div class="title">
							<font class="order_status_box"> <font class="item"><s:property value="#item.customerCount" /><font class="text">参与</font> </font> <font class="item"> <s:property value="#item.productCount" /><font class="text">需求</font> </font> <font class="item"> <s:property
										value="#item.vendorCount" /><font class="text">供应</font> </font> <font class="item status"><s:text name="%{#item.statusText}" /> </font> </font> 
							<a href="<%=request.getContextPath()%>/order/viewOrder.do?id=<s:property value="#item.id" />"><font <s:if test="#item.confirmed">class="confirmed"</s:if>> <s:property value="#item.title" /> </font></a>

						</div>
						<div class="detail">
							地区:
							[ <s:property value="#item.vendorRegion.fullName" /> ] &nbsp;&nbsp;
							编号:
							<s:property value="#item.id" />
							创建于:
							<s:property value="#item.creationTime" />
						</div>
					</li>
				</s:iterator>
			</ul>
			<jsp:include page="/include/pagecute.jsp"></jsp:include>
		</s:else>
	</div>
</div>
<jsp:include page="/order/include/base_order_last_part.jsp"></jsp:include>